package com.vnp.vchat.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class ObjMsgChat implements Parcelable{
	public static final String TEXT = "text";
	public static final String IMAGE = "image";
	
	
	public static final int STATUS_SENDING = 0x0;
	public static final int STATUS_SUCCESS = 0x1;
	public static final int STATUS_ERROR = 0x2;
	
	String msgID;
	String tenKhachHang;
	String urlAvatarKhachhang;
	String type = "";
	String content ;
	
	String urlImageKH;
	String fromId;
	String id;
	
	int time;
	int status = STATUS_SENDING;
	
	public ObjMsgChat(Parcel in){
		msgID = in.readString();
		tenKhachHang = in.readString();
		urlAvatarKhachhang = in.readString();
		type = in.readString();
		content = in.readString();
		urlImageKH = in.readString();
		fromId = in.readString();
		id = in.readString();
		time = in.readInt();
		status = in.readInt();
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(msgID);
		dest.writeString(tenKhachHang);
		dest.writeString(urlAvatarKhachhang);
		dest.writeString(type);
		dest.writeString(content);
		dest.writeString(urlImageKH);
		dest.writeString(fromId);
		dest.writeString(id);
		dest.writeInt(time);
		dest.writeInt(status);
	}
	
	
	
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getMsgID() {
		return msgID;
	}


	public void setMsgID(String msgID) {
		this.msgID = msgID;
	}


	public int getTime() {
		return time;
	}


	public void setTime(int time) {
		this.time = time;
	}


	public String getUrlImageKH() {
		return urlImageKH;
	}


	public void setUrlImageKH(String urlImageKH) {
		this.urlImageKH = urlImageKH;
	}
	
	public ObjMsgChat(){
		
	}


	public ObjMsgChat(String fromId ,String urlAvatar, String content, String urlImageKh){
		super();
		this.fromId = fromId;
		this.urlAvatarKhachhang = urlAvatar;
		this.content = content;
		this.urlImageKH = urlImageKh;
	}
	
	
	public String getFromId() {
		return fromId;
	}
	public void setFromId(String fromId) {
		this.fromId = fromId;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getTenKhachHang() {
		return tenKhachHang;
	}
	public void setTenKhachHang(String tenKhachHang) {
		this.tenKhachHang = tenKhachHang;
	}
	public String getUrlAvatarKhachhang() {
		return urlAvatarKhachhang;
	}
	public void setUrlAvatarKhachhang(String urlAvatarKhachhang) {
		this.urlAvatarKhachhang = urlAvatarKhachhang;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}

	
	
	
	@Override
	public int describeContents() {
		return 0;
	}

	public static final Parcelable.Creator<ObjMsgChat> CREATOR = new Parcelable.Creator<ObjMsgChat>() {
		public ObjMsgChat createFromParcel(Parcel in) {
			return new ObjMsgChat(in);
		}

		public ObjMsgChat[] newArray(int size) {
			return new ObjMsgChat[size];
		}
	};
	
	

}
